package com.gopay.solution.dao.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.gopay.solution.domain.po.SsTransLimitConfDtl;

/**
 * 方案服务 用户界面配置方案明细
 * @SsTransLimitConfDtlDAOImpl.java
 * @author liujy
 * @2013-4-22 下午5:51:08  www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("ssTransLimitConfDtlDAO")
public class SsTransLimitConfDtlDAOImpl extends
        SolutionRuleDtlDAOImpl<SsTransLimitConfDtl, Serializable> {

    @Override
    public SsTransLimitConfDtl getByPk(Serializable id) {
        return find(SsTransLimitConfDtl.class, id);
    }

    @Override
    public List<SsTransLimitConfDtl> listBySolutionId(long solutionId) {
        String hql = "from SsTransLimitConfDtl where solutionId = " + solutionId;
        return findByHql(hql);
    }

    @Override
    public boolean delBySolutionId(long solutionId) {
        List<SsTransLimitConfDtl> dtls = listBySolutionId(solutionId);
        if (dtls != null && dtls.size() > 0) {
            deleteAll(dtls);
        }
        return true;
    }

    @Override
    public List<SsTransLimitConfDtl> listBySoluIdAndIntTxnCd(long solutionId, String intTxnCd) {
        return null;
    }

    @Override
    public boolean delBySoluIdAndIntTxnCd(long solutionId, String intTxnCd) {
        return false;
    }
}
